package com.firemoss.atonement.example.contactmanager.service.mock
{
	import com.firemoss.atonement.example.contactmanager.service.dto.ContactDTO;
	import com.firemoss.magicbus.rpc.mock.IMockReturnValueFactory;
	
	import mx.utils.UIDUtil;
	
	public class SaveContactReturnValueFactory implements IMockReturnValueFactory
	{
		public function SaveContactReturnValueFactory()
		{
		}
		
		public function create(args:Array):*
		{
			var dto : ContactDTO = args[0];
			
			if ( dto.key == null ) dto.key = UIDUtil.createUID()
				
			return dto
		}
	}
}